﻿Module Validaciones
    Public Function ValidarCadena(ByVal Cadena As String, ByVal LongitudMaxima As Integer, ByVal Requerido As Boolean) As Boolean
        Dim salida As Boolean = False

        If Cadena.Length < LongitudMaxima Then
            salida = True
        End If

        If Requerido Then
            If Cadena.Length > 0 Then
                salida = True
            Else
                salida = False
            End If
        End If

        Return salida

    End Function
End Module
